package edu.ccut.saturn.studio.naviagtor.actions;

import org.eclipse.jface.wizard.WizardDialog;
import org.eclipse.ui.PlatformUI;

import edu.ccut.saturn.studio.Activator;
import edu.ccut.saturn.studio.Images;
import edu.ccut.saturn.studio.core.util.action.SaturnAction;
import edu.ccut.saturn.studio.core.util.eclipse.Messages;
import edu.ccut.saturn.studio.wfg.wizard.WfgWizard;

/**
 * 
 * @author Bai Yucheng 2007-11-02
 */
public class NewSaturnWorkFlowAction extends SaturnAction {

	public NewSaturnWorkFlowAction() {
//		setText("WorkFlow"); 
		setText(Messages.getString("NewSaturnWorkFlowAction.workfolw")); //$NON-NLS-1$
		setImageDescriptor(Activator.getImageDescriptor((Images.NEWSATURN_WORKFLOW_ACTION)));
	}

	public void run() {
		WfgWizard newWorkFlowWizard = new WfgWizard();
		newWorkFlowWizard.init(PlatformUI.getWorkbench(), super.getStructuredSelection());
		WizardDialog wizarddialog = new WizardDialog(PlatformUI.getWorkbench()
				.getActiveWorkbenchWindow().getShell(), newWorkFlowWizard);
		wizarddialog.open();
	}
}


